package EumnAndIf;



/**
 * @author Knife
 */

public enum ChooseByEnum {
    JACK("jack"),
    LOCK("lock"),
    BOSS("merry"),
    MERRY("boss");

    private final String name;

    ChooseByEnum(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public static String chooseByEnum(String name){
        for (ChooseByEnum value : ChooseByEnum.values()){
            if (name.equalsIgnoreCase(value.name())){
                return value.getName();
            }
        }
        return "null";
    }

}
